package com.bstek.uflo.designer.command;

import com.bstek.uflo.command.Command;
import com.bstek.uflo.env.Context;

/**
 * @author matt.yao@bstek.com
 * @since 1.0
 */
public class SaveObjectCommand<T> implements Command<T> {
	
	private T t;

	public SaveObjectCommand(T t) {
		this.t = t;
	}

	public T execute(Context context) {
		context.getSession().saveOrUpdate(t);
		return t;
	}
}